;---------------------------------------------------------------------------
;Thunder Beam (Ground)
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3000+4*(PalNo = 6)
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 17

[State 3000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = 9,-27*floor(const(size.yscale))
postype = p1

[State 3000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3000, 4]
type = Helper
trigger1 = AnimElem = 6
name = "Elec Beam 2"
ID = 3000
stateno = 3010
pos = 83,-29
postype = p1
facing = 1
ownpal = 1

[State 3000, 4]
type = Helper
trigger1 = AnimElem = 6
name = "Elec Beam"
ID = 3000
stateno = 3001
pos = 83,-29
postype = p1
facing = 1
ownpal = 1

[State 3000, 4]
type = Helper
trigger1 = AnimElem = 6
name = "Elec Beam Up"
ID = 3001
stateno = 3002
pos = 31,-39
postype = p1
facing = 1
ownpal = 1

[State 3000, 4]
type = Helper
trigger1 = AnimElem = 6
name = "Elec Beam Down"
ID = 3002
stateno = 3003
pos = 31,-11
postype = p1
facing = 1
ownpal = 1

[State 3000, 5]
type = VarAdd
trigger1 = AnimElem = 6
var(37) = 4

[State 3000, 6]
type = VarSet
trigger1 = !Time
var(13) = 0

[State 3000, 7]
type = PlaySnd
trigger1 = AnimElem = 6
value = S3000,0

[State 3000, 8]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 18 && TeamSide = 1
anim = 8037
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 18 && TeamSide = 2
anim = 8037
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 10]
type = RemoveExplod
trigger1 = !AnimTime 
id = 8030

[State 3000, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Electricity
[Statedef 3001]
type    = S
movetype= A
physics = N
anim = 3001
velset = 5.56,0
ctrl = 0
sprpriority = 3

[State 3001, 1]
type = HitDef
trigger1 = root,Var(5) < 10 && root,Var(13) = 0 && Time = 8
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(250*root,Fvar(20)),63
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 20
ground.velocity = -6.5,-6
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -4.9,-3.1
air.hittime = 200
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3001
chainID = -1
nochainID = 3000
numhits = 1
hitonce = 0

[State 3001, 2]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = !(target,Time)
value = 5450
ID = -1
ignorehitpause = 1

[State 3001, 3]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3001, 4]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 10
ignorehitpause = 1

[State 3001, 5]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 3001, 6]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 3001, 7]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3001, 7]
type = Null
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3001, 8]
type = ChangeState
trigger1 = FrontEdgeDist < -80
value = 1003
;---------------------------------------------------------------------------
;Electricity (Up)
[Statedef 3002]
type    = A
movetype= A
physics = N
anim = 3002
velset = 0,-7
ctrl = 0
sprpriority = 3

[State 3002, 1]
type = HitDef
trigger1 = root,Var(5) < 10 &&  root,Var(13) = 0 &&  Time = 8
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(250*root,Fvar(20)),63
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 200
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3002
chainID = -1
nochainID = 3000
numhits = 1
hitonce = 0

[State 3002, 2]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = !(target,Time)
value = 5450
ID = -1
ignorehitpause = 1

[State 3002, 3]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3002, 4]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3002, 5]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 3002, 6]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 3002, 7]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3002, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3002, 9]
type = ChangeState
trigger1 = ScreenPos Y < 30
value = 1003
;---------------------------------------------------------------------------
;Electricity (Down)
[Statedef 3003]
type    = A
movetype= A
physics = N
anim = 3003
velset = 0,7
ctrl = 0
sprpriority = 3

[State 3003, 1]
type = HitDef
trigger1 = root,Var(5) < 10 && root,Var(13) = 0 && Time = 8
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 200,100
animtype = Hard
priority = 4,Hit
getpower = 0,0
damage = ceil(250*root,Fvar(20)),63
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 200
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3003
chainID = -1
nochainID = 3000
numhits = 1
hitonce = 0

[State 3003, 2]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = !(target,Time)
value = 5450
ID = -1
ignorehitpause = 1

[State 3003, 3]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3003, 4]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3003, 5]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 3003, 6]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 3003, 7]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3003, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3003, 9]
type = ChangeState
trigger1 = ScreenPos Y > 320
value = 1003
;---------------------------------------------------------------------------
;P2 Being Thrown
[Statedef 3004]
type    = A
movetype= H
physics = N
anim = 5470
velset = -1*abs(GetHitVar(xvel)),GetHitVar(yvel)

[State 726, 2]
type = NotHitby
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 726, 3]
type = Gravity
trigger1 = 1

[State 727, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Elec Beam (Air)
[Statedef 3005]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3005+1*(PalNo = 6)
ctrl = 0
sprpriority = 2

[State 3005, 1]
type = VarSet
trigger1 = !Time
fvar(11) = Vel Y

[State 3005, 2]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 10

[State 3005, 3]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = -1,-27*floor(const(size.yscale))
postype = p1

[State 3005, 4]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3005, 5]
type = Helper
trigger1 = AnimElem = 4
name = "Elec Beam 2"
ID = 3000
stateno = 3010
pos = 83,-29
postype = p1
facing = 1
ownpal = 1

[State 3005, 6]
type = Helper
trigger1 = AnimElem = 4
name = "Elec Beam"
ID = 3000
stateno = 3001
pos = 87,-29
postype = p1
facing = 1
ownpal = 1

[State 3005, 7]
type = Helper
trigger1 = AnimElem = 4
name = "Elec Beam Up"
ID = 3000
stateno = 3002
pos = 31,-39
postype = p1
facing = 1
ownpal = 1

[State 3005, 8]
type = Helper
trigger1 = AnimElem = 4
name = "Elec Beam Down"
ID = 3000
stateno = 3003
pos = 31,-11
postype = p1
facing = 1
ownpal = 1

[State 3000, 9]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 4

[State 3005, 10]
type = VelAdd
trigger1 = Time >= 18
y = .44

[State 3005, 11]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3000,0
channel = 6

[State 3005, 12]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 11 && TeamSide = 1
anim = 8037
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3005, 13]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 11 && TeamSide = 2
anim = 8037
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3005, 14]
type = RemoveExplod
trigger1 = !AnimTime 
trigger2 = Vel Y > 0 && Pos Y > -Vel Y
id = 8030

[State 3005, 15]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1009
;---------------------------------------------------------------------------
;Electricity
[Statedef 3010]
type    = S
movetype= A
physics = N
anim = 3010
velset = 0,0
ctrl = 0
sprpriority = 3

[State 3010, 1]
type = HitDef
trigger1 = root,Var(5) < 10 && !Time
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(250*root,Fvar(20)),63
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.hittime = 20
ground.velocity = -6.5,-6
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -4.9,-3.1
air.hittime = 200
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3000
chainID = -1
nochainID = -1
numhits = 1
hitonce = 0

[State 3001, 2]
type = TargetState
trigger1 = NumTarget && MoveHit
trigger1 = !(target,Time)
value = 5450
ID = -1
ignorehitpause = 1

[State 3001, 3]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3001, 4]
type = ParentVarSet
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(13) = 1
ignorehitpause = 1

[State 3001, 5]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 3001, 6]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 3001, 7]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3001, 7]
type = Null
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3001, 8]
type = ChangeState
trigger1 = !AnimTime
value = 1003
;---------------------------------------------------------------------------
;Gemini Laser
[Statedef 3050]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3050+9*(PalNo = 6)
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3050, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 36
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 5

[State 3050, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = 9,-27*floor(const(size.yscale))
postype = p1

[State 3000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 36
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3000, 4]
type = VarSet
trigger1 = AnimElem = 3
fvar(10) = FVar(20)

[State 3050, 5]
type = Helper
trigger1 = AnimElem = 3
name = "Laser1"
ID = 3050
stateno = 3051
pos = 39,-25*floor(const(size.yscale))
postype = p1

[State 3050, 6]
type = Helper
trigger1 = AnimElem = 6
name = "Laser2"
ID = 3050
stateno = 3056
pos = 50,-59*floor(const(size.yscale))
postype = p1

[State 3050, 7]
type = Helper
trigger1 = AnimElem = 10
name = "Laser3"
ID = 3050
stateno = 3054
pos = 40,-59*floor(const(size.yscale))
postype = p1

[State 3050, 8]
type = VarAdd
trigger1 = AnimElem = 3 || AnimElem = 6 || AnimElem = 10
var(14) = 1

[State 3050, 9]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 6 || AnimElem = 10
value = S3050,0 

[State 3050, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 6 && TeamSide = 1
anim = 8038
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3050, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 6 && TeamSide = 2
anim = 8037
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3050, 12]
type = RemoveExplod
trigger1 = !AnimTime 
id = 8030

[State 3050, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Laser (Horizontal)
[Statedef 3051]
type    = A
movetype= A
physics = N
velset = 5.56,0
anim = 3051
ctrl = 0
sprpriority = 2

[State 3051, 1]
type = HitDef
trigger1 = !Time
attr = A,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(76*root,fvar(10)),19
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 100
id = 3050
chainID = -1
nochainID = -1
numhits = 1

[State 3051, 3]
type = HitBy
trigger1 = 1
value = SCA,HA,SP,HP
time = -1

[State 3051, 4]
type = HitOverride
trigger1 = 1
attr = SCA,HA,SP,HP
slot = 0
stateno = 1012
time = -1

[State 3051, 5]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Var(15) = 0 && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3051, 6]
type = ParentVarSet
trigger1 = NumTarget && MoveHit && root,Var(15) = 0
var(15) = 1
ignorehitpause = 1
persistent = 0

[State 3051, 7]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3001, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3051, 9]
type = ChangeState
trigger1 = MoveContact
value = 3058

[State 3051, 6]
type = VarSet
trigger1 = FrontEdgeDist < -16
var(2) = 1

[State 3051, 7]
type = ChangeState
trigger1 = FrontEdgeDist < -16
value = 3052
;---------------------------------------------------------------------------
;Laser (Bounce Side Wall)
[Statedef 3052]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3052
ctrl = 0
sprpriority = 2

[State 3051, 1]
type = HitDef
trigger1 = !Time
attr = A,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(76*root,fvar(10)),19
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 100
id = 3050
chainID = -1
nochainID = -1
numhits = 1

[State 3052, 3]
type = HitBy
trigger1 = 1
value = SCA,HA,SP,HP
time = -1

[State 3052, 4]
type = HitOverride
trigger1 = 1
attr = SCA,HA,SP,HP
slot = 0
stateno = 1012
time = -1

[State 3052, 5]
type = ChangeState
trigger1 = !AnimTime
value = 3056

[State 3052, 6]
type = VarAdd
trigger1 = !Time
var(1) = 1

[State 3051, 7]
type = Null
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3051, 8]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3051, 9]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3051, 10]
type = ChangeState
trigger1 = MoveContact
value = 3058

;---------------------------------------------------------------------------
;Laser (Floor Bounce)
[Statedef 3054]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3054
ctrl = 0
sprpriority = 2

[State 3054, 1]
type = HitDef
trigger1 = !Time
attr = A,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(76*root,fvar(10)),19
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 100
id = 3050
chainID = -1
nochainID = -1
numhits = 1

[State 3051, 2]
type = HitBy
trigger1 = 1
value = SCA,HA,SP,HP
time = -1

[State 3051, 3]
type = HitOverride
trigger1 = 1
attr = SCA,HA,SP,HP
slot = 0
stateno = 1012
time = -1

[State 3054, 4]
type = PosSet
trigger1 = !Time
y = 0

[State 3054, 35]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Var(15) = 0 && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3051, 6]
type = ParentVarSet
trigger1 = NumTarget && MoveHit && root,Var(15) = 0
var(15) = 1
ignorehitpause = 1
persistent = 0

[State 3054, 7]
type = Turn
trigger1 = PrevStateNo = 3056 && !Time

[State 3054, 8]
type = PosAdd
trigger1 = PrevStateNo = 3056 && !Time
x = 37

[State 3054, 9]
type = VarAdd
trigger1 = !Time
var(1) = 1

[State 3051, 10]
type = Null
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3051, 11]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3052, 12]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3051, 13]
type = ChangeState
trigger1 = MoveContact
value = 3058

[State 3054, 14]
type = ChangeState
trigger1 = !AnimTime 
value = 3056
;---------------------------------------------------------------------------
;Laser (Diagonal)
[Statedef 3056]
type    = A
movetype= A
physics = N
velset = 5.56,-5.56
anim = 3056
ctrl = 0
sprpriority = 2

[State 3056, 1]
type = HitDef
trigger1 = !Time
attr = A,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
animtype = Hard
priority = 4,Hit
getpower = 0,0
givepower = 200,100
damage = ceil(76*root,fvar(10)),19
pausetime = 1,1
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 100
id = 3050
chainID = -1
nochainID = -1
numhits = 1

[State 3051, 2]
type = HitBy
trigger1 = 1
value = SCA,HA,SP,HP
time = -1

[State 3051, 3]
type = HitOverride
trigger1 = 1
attr = SCA,HA,SP,HP
slot = 0
stateno = 1012
time = -1

[State 3051, 4]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Var(15) = 0 && (PrevStateNo != [3051,3059]) && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3051, 5]
type = ParentVarSet
trigger1 = NumTarget && MoveHit && root,Var(15) = 0
var(15) = 1
ignorehitpause = 1
persistent = 0

[State 3056, 6]
type = Turn
trigger1 = (PrevStateNo = 3052 || PrevStateNo = 3057) && !Time

[State 3056, 7]
type = VelSet
trigger1 = PrevStateNo = 3052 && !Time
x = Vel X * -1

[State 3056, 8]
type = VelSet
trigger1 = PrevStateNo = 3057 && !Time
y = Vel y * -1

[State 3056, 9]
type = PosAdd
trigger1 = (PrevStateNo = 3052 || PrevStateNo = 3054) && !Time
x = 37
y = -37

[State 3056, 10]
type = PosAdd
triggerall = PrevStateNo = 3057 && BackEdgeDist >= 0
trigger1 = !Time
y = -37

[State 3056, 11]
type = PosAdd
trigger1 = (PrevStateNo = 3057 && BackEdgeDist < 20) && !Time
x = -37
y = 37

[State 3056, 12]
type = VarAdd
trigger1 = !Time
var(1) = 1

[State 3056, 13]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1

[State 3056, 14]
type = HitOverride
trigger1 = 1
attr = SCA,AP
slot = 0
stateno = 1002
time = -1

[State 3051, 15]
type = Null
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3051, 16]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3051, 17]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3051, 18]
type = ChangeState
trigger1 = MoveContact
value = 3058

[State 3056, 19]
type = ChangeState
triggerall = Var(1) < 29
trigger1 = ScreenPos Y < 0 && PrevStateNo != 3057
value = 3057

[State 3056, 20]
type = ChangeState
triggerall = Var(1) < 29
trigger1 = BackEdgeDist < 0 && PrevStateNo != 3051
value = 3057

[State 3056, 21]
type = ChangeState
triggerall = Var(1) < 29
trigger1 = Pos Y >= -39 && PrevStateNo != 3054
value = 3054

[State 3056, 22]
type = ChangeState
triggerall = Var(1) >= 29
trigger1 = FrontEdgeDist < -100
trigger2 = BackEdgeDist < -100
trigger3 = ScreenPos Y < -50
trigger4 = ScreenPos Y > 280
value = 3058

;---------------------------------------------------------------------------
;Laser (Top/Bottom Bounce)
[Statedef 3057]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 3058
ctrl = 0
sprpriority = 2

[State 3057, 1]
type = HitDef
trigger1 = !Time
attr = A,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 200,100
animtype = Hard
priority = 4,Hit
getpower = 0,3
pausetime = 1,1
damage = ceil(76*root,fvar(10)),19
pausetime = 0,0
sparkno = S6001
sparkxy = -1,-1*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 19
guard.hittime = 15
ground.velocity = -4.3,-3
guard.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3.9,-2.4
air.hittime = 100
id = 3050
chainID = -1
nochainID = -1
numhits = 1

[State 3057, 2]
type = PosAdd
trigger1 = !AnimTime
y = 37

[State 3057, 3]
type = AngleSet
trigger1 = BackEdgeDist < 0 && !Time
value = 90

[State 3057, 4]
type = VarAdd
trigger1 = !Time
var(1) = 1

[State 3057, 5]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1

[State 3057, 6]
type = HitOverride
trigger1 = 1
attr = SCA,AP
slot = 0
stateno = 1002
time = -1

[State 3051, 6]
type = Null
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 3051, 7]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 3051, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 305
ignorehitpause = 1

[State 3051, 9]
type = ChangeState
trigger1 = MoveContact
value = 3058

[State 3057, 10]
type = ChangeState
trigger1 = !AnimTime
value = 3056
;-------------------------------------------------------------------------
;Laser Dead
[Statedef 3058]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 3058, 1]
type = ParentVarAdd
trigger1 = !Time
var(14) = -1

[State 3058, 2]
type = DestroySelf
triggerall = Time
trigger1 = !NumTarget
trigger2 = NumTarget 
trigger2 = target,StateType = L
;------------------------------------------------------
;Rush Adapter
[Statedef 4000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 4000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 59
sound = F8020, 1
darken = 0
poweradd = -3000
movetime = 59

[State 4000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = -1,-27*floor(const(size.yscale))
postype = p1

[State 4000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 59
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 4000, 4]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4000, 5]
type = Helper
trigger1 = !Time
name = "Rush"
ID = 4010
stateno = 4010
pos = 0,0*floor(const(size.yscale))
postype = p1
pausemovetime = 999
supermovetime = 999

[State 4000, 6]
type = Helper
trigger1 = !Time
name = "Super Armor"
ID = 4020
stateno = 4020
pos = 0,0*floor(const(size.yscale))
postype = p1
pausemovetime = 999
supermovetime = 999

[State 4000, 7]
type = PlaySnd
trigger1 = AnimElem = 2
value = S4000,0

[State 4000, 8]
type = ChangeState
trigger1 = !AnimTime
value = 4001
;------------------------------------------------------
;Rush Adapter (Power Adapter)
[Statedef 4001]
type    = S
movetype= A
physics = N
velset = 2.2,0
anim = 4001
ctrl = 0
sprpriority = 2

[State 4001, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4001, 2]
type = Helper
trigger1 = AnimElem = 3
name = "Power Shot"
ID = 4005
stateno = 4005
pos = 30,-25
postype = p1
facing = 1
ownpal = 1

[State 4001, 3]
type = PlaySnd
trigger1 = AnimElem = 3
value = S4000,1

[State 4001, 4]
type = PlaySnd
trigger1 = AnimElemTime(3) = 1
value = S215,0

[State 4001, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 1
anim = 8039
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4001, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 2
anim = 8039
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4001, 7]
type = ChangeState
trigger1 = Time = 64
value = 4002
;------------------------------------------------------
;Rush Adapter (Power Adapter Big Shot)
[Statedef 4002]
type    = S
movetype= A
physics = N
velset = 2.2,0
anim = 4002
ctrl = 0
sprpriority = 2

[State 4002, 1]
type = StateTypeSet
trigger1 = AnimElem = 17
physics = S

[State 4002, 2]
type = Helper
trigger1 = AnimElem = 17
name = "Charged Power Shot"
ID = 4006
stateno = 4006
pos = 30,-25
postype = p1
facing = 1
ownpal = 1

[State 4002, 3]
type = NotHitBy
trigger1 = Time < 71
value = SCA
time = 1

[State 4002, 4]
type = Helper
trigger1 = Time = 66
name = "Rush Escape"
ID = 4010
stateno = 4012
pos = 0,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 4002, 5]
type = PlaySnd
trigger1 = !Time
value = S1000,0

[State 4002, 6]
type = PlaySnd
trigger1 = AnimElem = 17
value = S4000,1

[State 4002, 7]
type = PlaySnd
trigger1 = AnimElemTime(17) = 1
value = S215,0

[State 4002, 8]
type = PlaySnd
trigger1 = AnimElemTime(23) = 2
value = S4000,0

[State 4002, 9]
type = RemoveExplod
trigger1 = !AnimTime 
id = 8030

[State 4002, 10]
type = ChangeState
trigger1 = Cond(NumHelper(4006),helper(4006),StateNo = 4007,0) && P2MoveType = H && Time = 58
value = 4003

[State 4002, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------
;Rush Adapter (Power Adapter Big Shot)
[Statedef 4003]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4003
ctrl = 0
sprpriority = 2

[State 4003, 1]
type = Helper
trigger1 = !Time
name = "Rush Suit Swap"
ID = 4010
stateno = 4011
pos = 0,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 4003, 2]
type = VelSet
trigger1 = AnimElem = 8 
x = 3.2

[State 4003, 3]
type = VelAdd
trigger1 = Time > 48
x = .15

[State 4003, 4]
type = PlaySnd
trigger1 = !Time
value = S4000,0

[State 4003, 5]
type = PlaySnd
trigger1 = Time = 64
value = S4000,2

[State 4003, 6]
type = HitDef
trigger1 = Time > 48 && Cond(NumHelper(4006),(abs(Pos X - helper(4006),Pos X) < 38),0)
attr = S, HT
hitflag = MAF+
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 4004
guard.dist = 0
fall = 1
fall.recovertime = 1
numhits = 1

[State 4003, 7]
type = PlayerPush
trigger1 = 1
value = 0

[State 4003, 8]
type = Null
trigger1 = NumTarget
value = 4004
ignorehitpause = 1

[State 4002, 9] ;;;;CHANGE THIS UP
type = ChangeState
triggerall = Time > 48
trigger1 = !NumHelper(4006)
value = 4009
;------------------------------------------------------
;Rush Adapter (Power Adapter Big Shot)
[Statedef 4004]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4004
ctrl = 0
sprpriority = 2

[State 4004, 1]
type = TargetState
trigger1 = !Time
value = 4030
ID = -1

[State 4004, 2]
type = VelAdd
trigger1 = Anim = 4004 && Time <= 12 
y = -.55

[State 4004, 3]
type = TargetBind
trigger1 = Anim = 4004 && Time <= 41  
time = 1
pos = 15,-10

[State 4004, 4]
type = TargetBind
trigger1 = Anim = 4004 && Time > 42
time = 1
pos = 15,10

[State 4004, 5]
type = VelAdd
trigger1 = Anim = 4004 && Time > 41 && Time < 86
y = .55

[State 4004, 6]
type = ScreenBound
trigger1 = Anim = 4004
value = 0

[State 4004, 7]
type = VelSet
trigger1 = Anim = 4004 && Time = 87 
x = 0
y = 0

[State 4004, 8]
type = EnvShake
trigger1 = Anim = 4004 && Time = 87
time = 10
freq = 120
ampl = -36

[State 4004, 9]
type = Pause
trigger1 = Anim = 4004 && Time = 87
time = 18
movetime = 2

[State 4004, 10]
type = StopSnd
trigger1 = Anim = 4004 && Time = 87
channel = -1 

[State 4004, 11]
type = PlaySnd
trigger1 = Anim = 4004 && Time = 87
value = F7,2

[State 4004, 12]
type = TargetLifeAdd
trigger1 = Anim = 4004 && Time = 87
value = -100
ID = -1
kill = 1

[State 4004, 13]
type = VarSet
trigger1 = Time >= 87 && WinKO && RoundState = 3
var(28) = 400

[State 4004, 14]
type = HitAdd
trigger1 = Anim = 4004 && Time = 87
value = 1

[State 4004, 15]
type = PlaySnd
trigger1 = Anim = 4004 && !Time
value = S4000,3
loop = 1

[State 4004, 16]
type = ChangeAnim
trigger1 = Anim = 4004 && Time = 95
value = 43
;*************************************************************************
[State 4004, 17]
type = TargetState
trigger1 = Anim = 43 && AnimElem = 1
value = 4031

[State 4004, 18]
type = PalFX
trigger1 = Anim = 43 && AnimElem = 1
time = 3
add = 256,256,256

[State 4004, 19]
type = VelSet
trigger1 = Anim = 43 && AnimElem = 1
x = -2.55
y = -3

[State 4004, 20]
type = StateTypeSet
trigger1 = Anim = 43 && AnimElem = 1
statetype = A       
movetype = I      
physics = A        

[State 4004, 21]
type = PlayerPush
trigger1 = 1
value = 0

[State 4004, 22]
type = Helper
trigger1 = Anim = 43 && AnimElem = 1 
name = "Rush Escape"
ID = 4010
stateno = 4012
pos = 0,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 4004, 23]
type = VarSet
trigger1 = WinKO
var(4) = 1

[State 4004, 24]
type = RemoveExplod
trigger1 = Anim = 43 && AnimElem = 1
id = 8030

[State 4004, 25]
type = VarSet
trigger1 = !Time
var(5) = 10

;-------------------------------------------------------------------------
;Power Shot
[Statedef 4005]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 6.7
anim = 4005
sprpriority = 2

[State 4005, 1]
type = HitBy
trigger1 = 1
value = SCA,SA,HP
time = -1
ignorehitpause = 1

[State 4005, 2]
type = HitOverride
trigger1 = 1
attr = SCA,SA,HP
slot = 0
stateno = 1012
time = -1
ignorehitpause = 1

[State 4005, 3]
type = HitDef
trigger1 = !Time
attr = S, SP
damage = ceil(60*root,Fvar(20)),15
animtype = Hard
getpower = 0
givepower = 60,30
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,2
guardsound = F6, 0
ground.type = High
ground.slidetime = 11
ground.hittime  = 28
guard.hittime  = 10
ground.velocity = -6.2
ground.cornerpush.veloff = 0
air.type = High
air.velocity = -3,-3.2
air.hittime = 100
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 0

[State 4005, 4]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Var(16) = 0 && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 4005, 5]
type = ParentVarSet
trigger1 = NumTarget && MoveHit && root,Var(16) = 0
var(16) = 1
ignorehitpause = 1
persistent = 0

[State 4005, 65]
type = HitAdd
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 1
ignorehitpause = 1

[State 4005, 7]
type = ParentVarAdd
trigger1 = MoveContact && WinKO
var(4) = 1
ignorehitpause = 1

[State 4005, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 400
ignorehitpause = 1

[State 4005, 9]
type = ChangeState
trigger1 = MoveContact
value = 1012

[State 4005, 10]
type = DestroySelf
trigger1 = FrontEdgeDist < -40
;-------------------------------------------------------------------------
;Power Shot
[Statedef 4006]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 8.7
anim = 4006
sprpriority = 2

[State 4006, 1]
type = HitBy
trigger1 = 1
value = SCA,HP
time = -1

[State 4006, 2]
type = HitOverride
trigger1 = 1
attr = SCA,HP
slot = 0
stateno = 4006
time = -1

[State 4006, 3]
type = HitDef
trigger1 = !Time
attr = S, SP
damage = ceil(70*root,Fvar(20)),18
animtype = Hard
getpower = 0
givepower = 180,90
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,4
guardsound = F6, 0
ground.type = High
ground.slidetime = 11
ground.hittime  = 21
guard.hittime  = 10
ground.velocity = -6.2
ground.cornerpush.veloff = 0
air.type = High
air.velocity = -5,-3
air.hittime = 15
;fall = 1
;fall.recover = 0
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 0

[State 4006, 4]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && !Var(15) && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 4006, 5]
type = ParentVarSet
trigger1 = NumTarget && MoveHit && root,Var(15) = 0
var(15) = 1
ignorehitpause = 1
persistent = 0

[State 4006, 6]
type = HitAdd
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 1
ignorehitpause = 1

[State 4006, 7]
type = ParentVarAdd
trigger1 = MoveContact && WinKO
var(4) = 1
ignorehitpause = 1

[State 4006, 8]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 400
ignorehitpause = 1

[State 4006, 9]
type = ChangeState
trigger1 = MoveHit
value = 4007

[State 4006, 10]
type = ChangeState
trigger1 = MoveGuarded
value = 1012

[State 4006, 11]
type = DestroySelf
trigger1 = FrontEdgeDist < -40
;-------------------------------------------------------------------------
;Power Shot
[Statedef 4007]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1013
sprpriority = 2

[State 4007, 1]
type = ParentVarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 400
ignorehitpause = 1

[State 4007, 2]
type = TargetState
triggerall = NumTarget
;triggerall = target,StateType = A
trigger1 = !Time && target,MoveType = H
value = 4032
ID = -1

[State 4007, 3]
type = PlaySnd
triggerall = NumTarget
trigger1 = target,StateNo = 4033 && target,Time = 1
value = F5,3

[State 4007, 4]
type = PlaySnd
triggerall = NumTarget
trigger1 = target,StateNo = 4033 && target,Time = 1
value = F7,2

[State 4007, 5]
type = Explod
triggerall = NumTarget
trigger1 = target,StateNo = 4033 && target,Time = 1
anim = 6001 
ID = 3001
pos = 0,-32
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 4007, 6]
type = ChangeAnim
trigger1 = !AnimTime
value = 1

[State 4007, 7]
type = BindToTarget
triggerall = NumTarget && Anim = 1 && root,StateNo = 4003
trigger1 = target,StateNo = 4034
pos = 0,0,Foot

[State 4007, 8]
type = TargetState
triggerall = NumTarget 
trigger1 = target,StateNo = 4034 && root,Time >= 63 && (abs(root,Pos X - Pos X) < 36)
value = 4035
ID = -1

[State 4007, 9]
type = DestroySelf
trigger1 = root,StateNo != [4000,4999]
trigger2 = ParentDist X >= 0 && root,StateNo = 4003 && root,Time >= 70
;------------------------------------------------------
;Failsafe if Mega Man doesn't catch opponent
[Statedef 4009]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4009
ctrl = 0
sprpriority = 2

[State 4009, 1]
type = PalFX
trigger1 = !Time
time = 3
add = 256,256,256

[State 4009, 2]
type = Helper
trigger1 = !Time
name = "Rush Escape"
ID = 4010
stateno = 4012
pos = 0,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999
pausemovetime = 999

[State 4009, 3]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;------------------------------------------------------
;Rush (Power)
[Statedef 4010]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4011
ctrl = 0
sprpriority = 4

[State 4010, 1]
type = PosAdd
trigger1 = parent,BackEdgeDist > 45 && !Time
x = -45 

[State 4010, 2]
type = VelSet
trigger1 = AnimElem = 10
x = 3.53

[State 4010, 3]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 4010, 4]
type = DestroySelf
trigger1 = Time > 26 && ParentDist X = [-45,0]
;------------------------------------------------------
;Rush (Power)
[Statedef 4011]
type    = S
movetype= A
physics = N
velset = 0,-3.53
anim = 4012
ctrl = 0
sprpriority = 4

[State 4011, 1]
type = VelSet
trigger1 = AnimElem = 3
y = 3.53

[State 4011, 2]
type = DestroySelf
trigger1 = Time = 35
;------------------------------------------------------
;Rush (Power)
[Statedef 4012]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 4013
ctrl = 0
sprpriority = 4

[State 4012, 1]
type = VelSet
trigger1 = AnimElem = 5
y = -8.96

[State 4012, 2]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 4012, 3]
type = DestroySelf
trigger1 = ScreenPos Y < 30
;------------------------------------------------------
;Super Armor
[Statedef 4020]
type    = U
movetype= I
physics = N
velset = 0,0
anim = 4020
ctrl = 0
sprpriority = 2

[State 4020, 1]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 4020, 2]
type = HitBy
trigger1 = 1
value = SCA,AA,AP
time = 1

[State 4020, 3]
type = HitOverride
trigger1 = 1
attr = SCA,AA,AP
slot = 0
stateno = 4021
time = 1

[State 4020, 4]
type = DestroySelf
trigger1 = parent,StateNo = 4003
trigger2 = parent,StateNo = 4002 && parent,Time = 71
trigger3 = parent,StateNo != [4000,4002]
;------------------------------------------------------
;Super Armor
[Statedef 4021]
type    = U
movetype= I
physics = N
velset = 0,0
anim = 1
ctrl = 0
sprpriority = 2

[State 4021, 1]
type = VarSet
trigger1 = 1
var(1) = GetHitVar(damage)

[State 4021, 2]
type = ChangeState
trigger1 = 1
value = 4020

[State 4021, 3]
type = DestroySelf
trigger1 = parent,StateNo = 4003
trigger2 = parent,StateNo = 4002 && parent,Time >= 71
trigger3 = parent,StateNo != [4000,4002]
;---------------------------------------------------------------------------
;P2 Being Thrown
[Statedef 4030]
type    = A
movetype= H
physics = N
velset = 0,0

[State 4030, 1]
type = ChangeAnim2
Trigger1 = !Time
value = 4030

[State 4030, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AT
time = 1

[State 4030, 3]
type = ScreenBound
trigger1 = 1
value = 0

[State 4004, 4]
type = Null
trigger1 = Time = 96
value = 4031
;---------------------------------------------------------------------------
;P2 Being Thrown
[Statedef 4031]
type    = A
movetype= H
physics = N
velset = -3.1,-4.7

[State 4031, 1]
type = Gravity
trigger1 = 1 

[State 4031, 2]
type = ChangeAnim2
Trigger1 = !Time
value = 4031

[State 4031, 3]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100

;---------------------------------------------------------------------------
;P2 Dizzy In Air
[Statedef 4032]
type    = A
movetype= H
physics = N
velset = -15.3, -3.5
ctrl = 0
sprpriority = -2

[State 4032, 1]
type = ChangeAnim
trigger1 = !Time 
value = 5030

[State 1115, 2]
type = Null
trigger1 = Anim = 5035 && !AnimTime
value = 5050

[State 4032, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 4032, 3]
type = VelAdd
trigger1 = 1 
y = .25

[State 4032, 4]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4032, 5]
type = ChangeState
trigger1 = BackEdgeDist < 0
value = 4033

[State 4032, 6]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -Vel Y
value = 4034
;---------------------------------------------------------------------------
;P2 Wall Bounce
[Statedef 4033]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 4033, 1]
type = ScreenBound
trigger1 = 1
value = 1

[State 4033, 2]
type = ChangeAnim2
trigger1 = !Time
value = 4033

[State 4033, 3]
type = EnvShake
trigger1 = !Time
time = 5
freq = 60
ampl = -4

[State 4033, 5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4033, 6]
type = VelAdd
trigger1 = Time >= 21
y = .35

[State 4033, 7]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -Vel Y
value = 4034
;---------------------------------------------------------------------------
;P2 Dizzy In Air
[Statedef 4034]
type    = S
movetype= H
physics = N
velset = 0,0

[State 4034, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 4034, 2]
type = ScreenBound
trigger1 = 1
value = 1

[State 4034, 3]
type = ChangeAnim
trigger1 = !Time
value = 5300

[State 4034, 4]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4034, 5]
type = PlayerPush
trigger1 = 1
value = 0

[State 4034, 6]
type = SelfState
trigger1 = Time = 150
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;P2 Dizzy In Air
[Statedef 4035]
type    = S
movetype= H
physics = N
velset = 0,0

[State 4035, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 4035, 2]
type = ScreenBound
trigger1 = 1
value = 1

[State 4035, 3]
type = ChangeAnim
trigger1 = Anim != 5300 && !Time
value = 5300

[State 4035, 4]
type = SelfState
trigger1 = Time = 12
value = 0
ctrl = 1